chcp 65001

@echo off
@echo ------------------------------------------------------------
@echo 测试开始
pause

@echo.
@echo 1. 安装entry, resfile目录含有1.txt, 安装成功, 解压成功
hdc uninstall com.test.resfile
hdc install entry1.hap
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/1.txt
pause
@echo 继续覆盖安装entry, resfile目录含有2.txt, 安装成功, 覆盖成功
hdc install entry2.hap
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/1.txt
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/2.txt
pause

@echo.
@echo 2. 安装feature, resfile目录含有3.txt, 安装成功, 解压成功
hdc uninstall com.test.resfile
hdc install feature1.hap
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/myfeature/resources/resfile/3.txt
pause
@echo 继续覆盖安装feature, resfile目录含有4.txt, 安装成功, 覆盖成功
hdc install feature2.hap
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/myfeature/resources/resfile/3.txt
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/myfeature/resources/resfile/4.txt
pause

@echo.
@echo 3. 安装hsp, resfile目录含有1.txt, 安装成功, 解压成功
hdc uninstall com.test.resfile
hdc install hsp1.hsp
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/myhsp/resources/resfile/1.txt
pause
@echo 继续覆盖安装hsp, resfile目录含有2.txt, 安装成功, 覆盖成功
hdc install hsp2.hsp
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/myhsp/resources/resfile/1.txt
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/myhsp/resources/resfile/2.txt
pause

@echo.
@echo 4. 安装entry, resfile目录含有1.txt, 安装成功, 解压成功
hdc uninstall com.test.resfile
hdc install entry1.hap
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/1.txt
pause
@echo 继续覆盖安装entry, 不含resfile目录, 安装成功, 目录删除成功
hdc install entry_noresfile.hap
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/1.txt
pause

@echo.
@echo 5. 安装entry, 不含resfile目录, 安装成功
hdc uninstall com.test.resfile
hdc install entry_noresfile.hap
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile
pause
@echo 继续覆盖安装entry, resfile目录含有1.txt, 安装成功, 解压成功
hdc install entry1.hap
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/1.txt
pause

@echo.
@echo 6. 安装entry, resfile目录含有1.txt, 安装成功, 解压成功
hdc uninstall com.test.resfile
hdc install entry1.hap
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/1.txt
pause
@echo 继续升级安装entry, resfile目录含有3.txt, 安装成功, 覆盖成功
hdc install entry3_v2.hap
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/1.txt
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/3.txt
pause

@echo.
@echo 7. 安装entry, resfile目录含有1.txt, 安装成功, 解压成功
hdc uninstall com.test.resfile
hdc install entry1.hap
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/1.txt
pause
@echo 继续升级安装entry, 不含resfile目录, 安装成功, 目录删除成功
hdc install entry_noresfile_v2.hap
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/1.txt
pause

@echo.
@echo 8. 安装entry, 包含解压so, 不含resfile目录, 安装成功, 解压成功
hdc uninstall com.test.resfile
hdc install entry_so.hap
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/libs/arm/libappexecfwk_core.z.so
pause
@echo 继续覆盖安装entry, 包含解压so, 包含resfile目录, 安装成功, 解压成功
hdc install entry_so_resfile.hap
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/libs/arm/libappexecfwk_core.z.so
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/1.txt
pause

@echo.
@echo 9. 安装entry, 包含解压so, 包含resfile目录, 安装成功, 解压成功
hdc uninstall com.test.resfile
hdc install entry_so_resfile.hap
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/libs/arm/libappexecfwk_core.z.so
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/1.txt
pause
@echo 继续覆盖安装entry, 包含解压so, 不含resfile目录, 安装成功, resfile目录删除成功
hdc install entry_so.hap
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/libs/arm/libappexecfwk_core.z.so
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/1.txt
pause

@echo.
@echo 10. 安装entry, 包含resfile和子目录, 安装成功, 解压成功
hdc uninstall com.test.resfile
hdc install entry_subdir.hap
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/1.txt
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/subdir/2.txt
pause

@echo.
@echo 11. 安装entry, 包含resfile和子目录, 安装成功, 解压成功
hdc uninstall com.test.resfile
hdc install entry_subdir.hap
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/1.txt
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/subdir/2.txt
pause
@echo 继续升级安装entry, 包含resfile和子目录, 安装成功, 目录替换成功
hdc install entry_subdir_v2.hap
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/3.txt
hdc shell ls /data/app/el1/bundle/public/com.test.resfile/entry/resources/resfile/subdir_updata/4.txt
pause

@echo 测试结束
@echo ------------------------------------------------------------
pause
